package org.glandais.games.rebondrobots.solver;

import java.util.HashSet;
import java.util.Set;

import org.glandais.games.rebondrobots.board.Board;
import org.glandais.games.rebondrobots.board.Goal;
import org.glandais.games.rebondrobots.board.Robots;

public class BruteForceSolver {

	private Board board;

	private Robots robots;

	private Goal goal;

	public BruteForceSolver(Board board, Robots robots, Goal goal) {
		super();
		this.board = board;
		this.robots = robots;
		this.goal = goal;
	}

	public Solution solve() {
		// prevents loops
		Set<Robots> done = new HashSet<Robots>();

		BruteForceMove root = new BruteForceMove(null, board, robots, done,
				goal);
		Solution solution = root.solve();

		return solution;
	}

}
